//
//  KDCategoryPage.m
//  KDExample
//
//  Created by YeQing on 2017/5/16.
//  Copyright © 2017年 naruto. All rights reserved.
//  对象销毁， 关联的对象 testObject 也会一起销毁

#import "KDCategoryPage.h"
#import "NSObject+KDTest.h"
#import "KDCategoryObject.h"

@interface KDCategoryPage ()
@property (nonatomic, strong) NSObject      *categoryObj;
@end

@implementation KDCategoryPage
#pragma mark - system
+(void)load
{
    [kNBCURLRouterInstance registerScheme:@"KDCategoryPage" scheme:@"categorypage"];
}
- (void)viewDidLoad
{
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
    _categoryObj = [NSObject new];
    KDCategoryObject *categoryObjSub = [KDCategoryObject new];
    _categoryObj.testObject = categoryObjSub;
    
    //延迟5s 销毁 _categoryObj
    [self performSelector:@selector(performTestAction) withObject:nil afterDelay:5.0];
}


-(void)performTestAction
{
    //对象销毁， 关联的对象 testObject 也会销毁
    _categoryObj = nil;
}
@end
